#include <iostream>
using namespace std;
int main() {
  string str;
  cin >> str;
  string delimiters = "./";
  auto reverse = [](string str) {
    int l = 0, r = str.size() - 1;
    while (l <= r && str[l] == '0') l++;
    while (l <= r && str[r] == '0') r--;
    if (l > r) {
      cout << '0';
      return;
    }
    for (int i = r; i >= l; i--) {
      cout << str[i];
    }
  };

  for (char &delimiter : delimiters) {
    if (size_t pos = str.find(delimiter); pos != string::npos) {
      reverse(str.substr(0, pos));
      cout << delimiter;
      reverse(str.substr(pos + 1));
      cout << endl;
      return 0;
    }
  }
  if (str.back() == '%') {
    str.pop_back();
    reverse(str);
    cout << '%' << endl;
    return 0;
  }
  reverse(str);
  cout << endl;
}